package com.mobilad.bean;

import javax.faces.bean.ManagedProperty;

import com.mobilad.model.User;
import com.mobilad.service.AuthenticationService;
import com.mobilad.service.UserService;

public class MasterBean{
	
	protected String mobNr;
	protected String pwd;
	protected String pwd_top;
	protected String mobNr_top;
	protected User actualUser = null;
	protected String loginFailMsg;
	protected static String countryCode;
	
	@ManagedProperty(value = "#{userService}")
	protected UserService userService;
	
	

	@ManagedProperty(value = "#{authenticationService}")
	protected AuthenticationService authenticationService ; // injected Spring defined service for bikes

	public String getMobNr() {
		return mobNr;
	}

	public void setMobNr(String mobNr) {
		this.mobNr = mobNr;
	}

	public String getPwd() {
		return pwd;
	}

	public void setPwd(String pwd) {
		this.pwd = pwd;
	}

	public String getPwd_top() {
		return pwd_top;
	}


	public void setPwd_top(String pwd_top) {
		this.pwd_top = pwd_top;
	}


	public String getMobNr_top() {
		return mobNr_top;
	}


	public void setMobNr_top(String mobNr_top) {
		this.mobNr_top = mobNr_top;
	}
	

	public User getActualUser() {
		return actualUser ;
	}

	public void setActualUser(User actualUser) {
		this.actualUser = actualUser;

	}


	public String getLoginFailMsg() {
		return loginFailMsg;
	}

	public void setLoginFailMsg(String loginFailMsg) {
		this.loginFailMsg = loginFailMsg;
	}
	
	
	public UserService getUserService() {
		return userService;
	}


	public void setUserService(UserService userService) {
		this.userService = userService;
	}
	

	public void setAuthenticationService(AuthenticationService authenticationService) {
		
		this.authenticationService = authenticationService;
		}

	
	
	public AuthenticationService getAuthenticationService() {
		return authenticationService;
	}

	public String getCountryCode() {
		if(countryCode == null){
			countryCode="no";
		}
			
		return countryCode;
		
	}

	public void setCountryCode(String countryCode) {
		this.countryCode = countryCode;
	}
	
	


}